package com.googlecode.jkorpos.hangul;
/**
 * This enumeration represents Korean Choseong.
 */
public enum Choseong implements Jaso {
	/** ㄱ */ KIYEOK(0),
	/** ㄲ */ SSANGKIYEOK(1),
	/** ㄴ */ NIEUN(2),
	/** ㄷ */ TIKEUT(3),
	/** ㄸ */ SSANGTIKEUT(4),
	/** ㄹ */ RIEUL(5),
	/** ㅁ */ MIEUM(6),
	/** ㅂ */ PIEUP(7),
	/** ㅃ */ SSANGPIEUP(8),
	/** ㅅ */ SIOS(9),
	/** ㅆ */ SSANGSIOS(10),
	/** ㅇ */ IEUNG(11),
	/** ㅈ */ CIEUC(12),
	/** ㅉ */ SSANGCIEUC(13),
	/** ㅊ */ CHIEUT(14),
	/** ㅋ */ KHIEUKH(15),
	/** ㅌ */ THIEUTH(16),
	/** ㅍ */ PHIEUPH(17),
	/** ㅎ */ HIEUH(18),
	/** filler */ FILLER(95);
	
	public static final int START_INDEX = 0x1100;
	
	private final int offset;
	
	Choseong(int offset){
		this.offset = offset;
	}
	
	public int getOffset(){
		return offset;
	}

	public char toChar() {
		return (char)(START_INDEX + offset);
	}

	public static Choseong valueOf(int i) {
		return Choseong.values()[i];
	}
}
